package com.kiln.juxingqs.dialog

import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import androidx.appcompat.app.AppCompatActivity
import client.global.commlib.toast.toast
import com.kiln.juxingqs.R
import com.kiln.juxingqs.databinding.DialogLookwlLayoutBinding
import com.tzstore.oo.dialog.CenterDialog

open class LookWlDialog(context: Context) : CenterDialog<DialogLookwlLayoutBinding>(context) {

    var title: String = ""

    var dh: String = ""
    var gs: String = ""

    override fun getV(): Int {
        return R.layout.dialog_lookwl_layout
    }

    override fun postBinding() {
        binding.event = this
        binding.dh = dh
        binding.gs = gs
    }

    fun fz(str: String) {
        val cmb = context.getSystemService(AppCompatActivity.CLIPBOARD_SERVICE) as ClipboardManager
        cmb.setPrimaryClip(ClipData.newPlainText(null, str))
        toast("已复制")
    }
}